package com.distribute.pojo.Task;

import com.distribute.pojo.enums.TaskType;

import java.util.List;

public class HttpTaskDefinition extends TaskDefinition{

    private HttpTaskParams taskParams;

    private TaskType taskType = TaskType.HTTP;

    public TaskType getTaskType() {
        return taskType;
    }

    public void setTaskType(TaskType taskType) {
        this.taskType = taskType;
    }

    public static class HttpTaskParams {
        private List localParams;

        private List resourceList;

        private String httpMethod;

        private String httpCheckCondition;

        private String url;

        private String condition;

        private int connectTimeout;

        private int socketTimeout;

        private List<HttpParams> httpParams;

        public String getUrl() {
            return url;
        }

        public void setUrl(String url) {
            this.url = url;
        }

        public String getCondition() {
            return condition;
        }

        public void setCondition(String condition) {
            this.condition = condition;
        }

        public int getConnectTimeout() {
            return connectTimeout;
        }

        public void setConnectTimeout(int connectTimeout) {
            this.connectTimeout = connectTimeout;
        }

        public int getSocketTimeout() {
            return socketTimeout;
        }

        public void setSocketTimeout(int socketTimeout) {
            this.socketTimeout = socketTimeout;
        }

        public List getLocalParams() {
            return localParams;
        }

        public void setLocalParams(List localParams) {
            this.localParams = localParams;
        }

        public List getResourceList() {
            return resourceList;
        }

        public void setResourceList(List resourceList) {
            this.resourceList = resourceList;
        }

        public String getHttpMethod() {
            return httpMethod;
        }

        public void setHttpMethod(String httpMethod) {
            this.httpMethod = httpMethod;
        }

        public String getHttpCheckCondition() {
            return httpCheckCondition;
        }

        public void setHttpCheckCondition(String httpCheckCondition) {
            this.httpCheckCondition = httpCheckCondition;
        }

        public List<HttpParams> getHttpParams() {
            return httpParams;
        }

        public void setHttpParams(List<HttpParams> httpParams) {
            this.httpParams = httpParams;
        }
    }

    public static class HttpParams{

        private String prop;


        private String httpParametersType;

        private String value;

        public String getProp() {
            return prop;
        }

        public void setProp(String prop) {
            this.prop = prop;
        }

        public String getHttpParametersType() {
            return httpParametersType;
        }

        public void setHttpParametersType(String httpParametersType) {
            this.httpParametersType = httpParametersType;
        }

        public String getValue() {
            return value;
        }

        public void setValue(String value) {
            this.value = value;
        }
    }

    public HttpTaskParams getTaskParams() {
        return taskParams;
    }

    public void setTaskParams(HttpTaskParams taskParams) {
        this.taskParams = taskParams;
    }
}
